public class Test {

}
class Dog extends Animal{

    public Dog(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    public void bark(){
        System.out.println(this.name+"wang");
    }
}
class Bird extends Animal{

    public Bird(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    public void fly(){
        System.out.println(this.name+"飞");
    }
}
class Animal{
    public String name;
    public int age;
    public String color;

    public void eat(){
        System.out.println(this.name+"吃" );
    }
}

